<?
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
 
JLoader::register('CouponsHelper', dirname(__FILE__) . DS . 'helpers' . DS . 'coupons.php');
JLoader::register('LogicHelper', dirname(__FILE__) . DS . 'helpers' . DS . 'LogicHelper.php');

if($controller = JRequest::getVar( 'controller' )) {
    require_once( JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php' );
    $classname = 'CouponsController'.$controller;
    $controller = new $classname();
}
else
{
    jimport('joomla.application.component.controller');
    $controller = JController::getInstance('Coupons');
}
// Perform the Request task
$controller->execute(JRequest::getCmd('task'));
 
// Redirect if set by the controller
$controller->redirect();
